<template>
  <v-dialog :show.sync="dialogVisible" width="80%" title="编辑使用单位">
    <div v-if="dialogVisible" v-loading="loading">
      <div class="dialogTitle">基本信息</div>
      <el-form size="small" label-width="150px" ref="editForm" :model="editObj" :rules="rules" :label-position="labelPosition">
        <el-row :gutter="30">
          <el-col :span="8">
            <el-form-item label="单位名称" prop="applyUnit.unitName">
              <el-input v-model="editObj.applyUnit.unitName" placeholder="请输入单位名称" maxlength="30"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="单位类型" prop="applyUnit.unitType">
              <el-select v-model="editObj.applyUnit.unitType" placeholder="请选择单位类型">
                <el-option v-for="item in lists" :key="item.value" :label="item.label" :value="item.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="联系人姓名" prop="applyUnit.userName">
              <el-input v-model="editObj.applyUnit.userName" placeholder="请输入联系人姓名" maxlength="20"></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="联系人手机" prop="applyUnit.tell">
              <el-input v-model="editObj.applyUnit.tell" placeholder="请输入联系人手机" oninput="value=value.replace(/[^\d]/g,'')" maxlength="11"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="社会统一信用代码证" prop="applyUnit.creditNumber">
              <el-input v-model="editObj.applyUnit.creditNumber" placeholder="请输入社会统一信用代码证" maxlength="30"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="排序号" prop="applyUnit.sort">
              <el-input v-model="editObj.applyUnit.sort" placeholder="请输入排序号" oninput="value=value.replace(/[^\d]/g,'')" maxlength="3"></el-input>
            </el-form-item>
          </el-col>

          <!--                        <el-form-item label="物业"  prop="applyUnit.applyProperty" >-->
          <!--                            <el-input v-model="editObj.applyUnit.applyProperty" placeholder="请输入物业" maxlength="30"></el-input>-->
          <!--                        </el-form-item >-->
          <el-col :span="24">
            <el-form-item label="备注" class="full">
              <el-input v-model="editObj.applyUnit.remarks" placeholder="请输入备注" maxlength="200"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="附件" class="col-three">
              <v-upload
                type="file"
                ref="unitUpdateFileUpload"
                :busId="editObj.applyUnit.apUiId"
                modelType="apply-unit"
                @onSuccess="editEntity"
                canDelete
                v-model="editObj.fileList"
                :isView="false"
              ></v-upload>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <div slot="foot">
      <el-button type="primary" size="small" @click="dialogVisible = false" style="width: 80px">取 消</el-button>
      <el-button type="primary" size="small" v-throttle="[sendData]" style="width: 80px">保存</el-button>
    </div>
  </v-dialog>
</template>

<script src="./unit-edit.js">
</script>


<style scoped lang='scss'>
.dialogTitle {
  padding: 0 22px 10px;
  border-bottom: 1px solid #dee2e6;
  color: #666;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 20px;
}
</style>
